package com.lam.framework.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.lam.framework.mybatis.MybatisUtil;

import cn.hutool.core.lang.Snowflake;

@Configuration
public class BeanConfig {

    @Bean
    public Snowflake snowflake() {
    	int idNum = MybatisUtil.getIdWorkerNum();
    	return new Snowflake(idNum, idNum);
    }
}
